package fschmidt.tools.web;

import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import luan.LuanState;
import luan.modules.JavaLuan;
import luan.modules.web.HttpLuan;
import luan.LuanException;


public class LuanShell extends HttpServlet {
	protected static String mod = "web/web_shell";
	protected static LuanState luan = LuanState.newStandard();

	static {
		JavaLuan.privateAccess = true;
	}

	protected void service(HttpServletRequest request,HttpServletResponse response)
		throws IOException
	{
		try {
			HttpLuan.service(luan,request,response,mod);
		} catch(LuanException e) {
			throw new RuntimeException(e);
		}
	}
}
